import globals

import libtcodpy as lt


__author__="Action Farsi"
__date__ ="$6-lug-2009 21.30.41$"



def input_str(key):
    if key.vk is lt.KEY_ENTER:
        return True
    if key.vk is lt.KEY_CHAR:
        try:
            globals.input = globals.input + chr(key.c)
        except ValueError:
            pass
        return None
    if key.vk is lt.KEY_BACKSPACE:
        globals.input = globals.input[:-1]
        return None
    if key.vk is lt.KEY_ESCAPE:
        return False

class guicol:
    tx = lt.white
    bg = lt.black
    sts_bg = lt.Color(30,30,30)
    dialog_bg = lt.Color(10,10,45)
    dialog_tx = lt.Color(230,230,255)

    alphakey = lt.Color(254,254,254)

    marker = lt.Color(200,100,100)